home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / kcl / akcl / akcl1615.lha / Smakefile < prev    next >
Makefile  |  1991-10-24  |  4KB  |  173 lines

  1. .SUFFIXES: .c .V
  2.  
  3. # Fix up local paths, machine, etc in file h/`machine`.defs
  4. # which will be inserted just below this point in several makefiles.
  5.  
  6. # begin makedefs
  7. AKCLDIR=/usr/public/akcl
  8. SHELL=/bin/sh
  9. MACHINE=hp300-bsd
  10.  
  11. # Machine dependent makefile definitions for hp300 running 4.3bsd(mt xinu)
  12.  
  13. LBINDIR=/usr/local/bin
  14.  
  15. OFLAG    =  -O 
  16. LIBS    = -lm -lg 
  17. ODIR_DEBUG= -g
  18.  
  19. # This CC string will be used for compilation of the system,
  20. # and also in the compiler::*cc* variable for later compilation of
  21. # lisp files.
  22.  
  23. CC = gcc -fwritable-strings -msoft-float -DVOL=volatile -I$(AKCLDIR)/o 
  24. MAINDIR = /public/kcl
  25.  
  26. # Enable the fastloading mechanism which does not use ld -A
  27. # requires c/rel_.. machine dependent code.
  28.  
  29. RSYM    = rsym
  30. SFASL    = $(ODIR)/sfasl.o
  31.  
  32. #  Use the mp.s file on 68k machine 
  33.  
  34. MPFILES= $(MPDIR)/mpi-bsd68k.o   $(MPDIR)/libmport.a
  35.  
  36.  
  37. # When using SFASL it is good to have (si::build-symbol-table)
  38. INITFORM=(si::build-symbol-table)
  39.  
  40. # Use symbolic links
  41. SYMB=-s
  42.  
  43. LIBFILES=bsearch.o
  44.  
  45. # the  make to use for saved_kcp the profiler.
  46. KCP=kcp-bsd
  47. # end makedefs
  48.  
  49. HDIR = h
  50. CHANGED=nevernever.c
  51. BOTH=nevernever
  52. MERGE=./merge
  53.  
  54. all: h/config.h V/cmpnew/cmpvar.lsp
  55. # If the links have not yet been made do it:
  56. # set SYMB=-s in relink-script if you want symbolic links
  57.     xbin/if-exists xbin/${MACHINE}-fixes "sh xbin/${MACHINE}-fixes"
  58.     xbin/relink-files $(MAINDIR) $(SYMB)
  59.     make -f Smakefile merge
  60.     make -f Smakefile sources
  61.     @ rm -f   c/include.h
  62.     make -f Smakefile cmpinclude  
  63.     make -f  makefile  all  "CC=$(CC)" "SU=$(SU)"
  64. #     second pass may recompile some cmpnew and lsp files.
  65.     make -f makefile all "CC=$(CC)" "SU=$(SU)"
  66. #     After making successfully send in a notification to
  67. #    akcl@nicolas.ma.utexas.edu.   This is extremely helpful in
  68. #    tracking on which machines and OS versions there are problems.
  69. #    This will be done automatically by the  xbin/notify line.
  70.     @- if  fgrep ASSIGN-DOWN cmpnew/cmpvar.c > /dev/null ; \
  71.     then echo "Make of AKCL `cat minvers` completed." ; \
  72.     xbin/notify "CC=${CC}" ; \
  73.     else echo "The second pass of make failed to compile the new compiler" ;fi
  74.  
  75. h/config.h:
  76.     @ echo You should read the README file first:  You forgot to do
  77.     echo "% add-defs machine-name"
  78.     exit 1
  79.     
  80. V/cmpnew/cmpvar.lsp: ${MAINDIR}/cmpnew/cmpvar.lsp
  81.     @ echo You MUST restore the kcl.tar.Z and akcl.tar.Z with original write dates
  82.     @ echo No file in 'V/*/*' should be older than any file in ${MAINDIR}.
  83.     @ echo extract the files again or maybe touch 'V/*' 'V/*/*' 'V/*/*/*'
  84.     exit 1
  85.  
  86. Vmakefile:  V makedefs
  87.     xbin/make-Vmake > Vmakefile
  88.  
  89. sources: $(MERGE) Vmakefile
  90.     make -f Vmakefile
  91.     rm -f c/num_include.h c/include.h
  92.  
  93.  
  94. merge:  merge.c
  95.     cc -O merge.c -o $(MERGE)
  96.  
  97. remove-linked-changes:
  98.     echo rm -f bin/dpp c/include.h V/* */V/* | sed s:V/::g | sh
  99.  
  100. chown:
  101.     echo su and make -f Smakefile chown1
  102. chown1:
  103.     chown $(LOGNAME) o cmpnew lsp unixport c h doc xbin . \
  104.     Smakefile   V/*  */V/* 
  105.  
  106. clean-V:
  107.     for v in */V/* ; do \
  108.         echo mv $$v $$v.old | sed s:V/::g | sh  ;  \
  109.         echo ln -s ../standard-kcl/$$v $$v | sed s:V/::g | sh ;  \
  110.     done
  111.     for v in V/*; do \
  112.         echo mv $$v $$v.old | sed s:V/::g | sh  ;  \
  113.         echo ln -s standard-kcl/$$v $$v | sed s:V/::g | sh ;  \
  114.     done
  115.  
  116. setup:
  117.     make -f Smakefile remove-linked-changes
  118.     make -f Smakefile chown1
  119.     echo "xbin/relink-script $(MAINDIR) `pwd`"  | sh
  120.     
  121.  
  122.  
  123.  
  124. cmpinclude:
  125.     for v in c lsp o cmpnew unixport; do \
  126.         rm -f $$v/cmpinclude.h ; \
  127.         ln  h/cmpinclude.h  $$v/cmpinclude.h ; \
  128.     done
  129.  
  130. tar:
  131.     tar cf ../xkcl.tar .
  132.     
  133. clean:    
  134.     rm -f *~ #* */*~ */#* merge
  135.     for v in o unixport cmpnew lsp ; do  (cd $$v ; make clean ); done
  136.  
  137. sunview:
  138.     $(MERGE) standard-kcl/unixport/makefile sunv/chang sunv/makefile
  139.     make -f Smakefile "PORTDIR=sunv"
  140.  
  141.  
  142. # remove the c files from the changed version, and relink them to 
  143. # the MAINDIR.
  144. redolsp: 
  145.     for v in `echo lsp/V/*.lsp cmpnew/V/*.lsp | sed -e "s:\.lsp::g" -e "s:V/::g"` ;
  146.     do rm -f $$v.lsp $$v.c $$v.data $$v.o ;
  147.     ln $(MAINDIR)/$$v.lsp $$v.lsp ;
  148.     ln $(MAINDIR)/$$v.c $$v.c ;
  149.     ln $(MAINDIR)/$$v.data $$v.data ;
  150.     ln $(MAINDIR)/$$v.h $$v.h ;
  151.     rm unixport/saved_kcl;
  152.     make ;
  153.     make;
  154.  
  155.  
  156. doc:
  157.     (cd doc ; make install "LBINDIR=$(LBINDIR)")
  158.  
  159. xbin/print_doc: xbin/print_doc.c
  160.     $(CC) xbin/print_doc.c -o xbin/print_doc
  161.     
  162.  
  163. lsp/DOC:  
  164.     echo '(load "lsp/setdoc.lsp")(load "lsp/doc-file.lsp")(doc-file "lsp/DOC" (quote(lisp si)))' | xbin/kcl 
  165.  
  166.  
  167. kcp:
  168.     (cd go ; make  "CFLAGS = -I../h -pg  -c -g ")
  169.     (cd unixport ; make kcp)
  170.  
  171.     
  172.     
  173.